package com.shuai;


import com.shuai.api.UserService;
import com.shuai.model.User;
import com.shuai.proxy.ServiceProxyFactory;

/**
 * 简易服务消费者示例

 */
public class EasyConsumerExample {

    public static void main(String[] args) {

        // jdk动态代理
        UserService userService = ServiceProxyFactory.getProxy(UserService.class);
        // 调用
        User resUser = userService.getUserInfo("帅宏");
        if (resUser != null) {
            System.out.println(resUser.toString());
        } else {
            System.out.println("user == null");
        }
    }
}
